package com.woniuxy.order.service;

import com.alipay.api.AlipayApiException;
import com.woniuxy.core.model.GetOrdersByStallIdAndTimeForm;
import com.woniuxy.core.model.PageInfo;
import com.woniuxy.order.dao.OrderInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.order.service.impl.dto.OrderInfoDTO;
import com.woniuxy.order.service.param.*;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 凌玉春
 * @since 2024年01月15日
 */
public interface OrderInfoService extends IService<OrderInfo> {

    void creatOrder(CreatOrderParam param);

    List<RenterWaitingToUseOrder> findRenterWaitingToUseOrder(Integer renterId);

    void delWaitToUseOrder(Integer renterId, String orderInfoNum);

    String pagePayEarnest(String orderNum) throws Exception;

    void pagePayEarnestNotify(Map<String, String> params) throws AlipayApiException;

    String pagePay(String orderNum) throws Exception;

    void pagePayNotify(Map<String, String> params) throws AlipayApiException;

    PageInfo platformGetOrderPage(PlatformGetOrderParam param) throws ParseException;

    PageInfo platformGetOverTimeOrderPage(PlatformGetOverTimeOrderParam param);

    PageInfo getRenterOrders(RenterOrderParam param);

    PageInfo getCerOrders(Integer id, Integer current, Integer size);

    List<OrderInfoDTO> selectOrderByCarPlate(String plate);

    PageInfo getUserOrders(Integer id, Integer current, Integer size);

    PageInfo getUserOrdersByTime(GetUserOrderByTimeParam param) throws ParseException;

    PageInfo getUserOrdersByState(GetUserOrderByStateParam param);

    List<OrderInfo> getOrderInfosByStallIds(Set<Integer> stallIds);

    List<OrderInfo> getOrdersByStallIdAndTime(GetOrdersByStallIdAndTimeForm form);

    void setHadComment(OrderInfo orderInfo);

    List<OrderInfoDTO> getNoCommentOrder(Integer id);

    String getTodayIncomeByCerId(Integer certifiedInfoId) throws ParseException;

    String platGetTodayIncome() throws ParseException;

    String renterGetTodayInCome(Integer renterId) throws ParseException;

    String cerGetMonthInCome(Integer certifiedInfoId) throws ParseException;

    String platGetMonthInCome() throws ParseException;

    String renterGetMonthInCome(Integer renterId) throws ParseException;
}
